<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns:ui="http://java.sun.com/jsf/facelets"
                template="../Templates/InnerSystemTemplate.xhtml"
                xmlns:p="http://primefaces.prime.com.tr/ui"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:f="http://java.sun.com/jsf/core">
    <ui:define name="head-title">
        <title>Home | Merlion's ERP System</title>
    </ui:define>
    
    <ui:define name="content">
        <br/><br/>
            <p:panel header="Messages"> 
                <f:view beforePhase="#{messageMeManagerBean.initView}">
                    <h:form>
                        <p:dataTable var="message" value="#{tableBean.messages}" paginator="true" rows="5"> 
                        <f:facet name="header">  
                            Announcements <a href="announcement.xhtml">(View All)</a>
                        </f:facet>

                        <p:column>  
                            <a href="index.xhtml"><h:outputText value="#{message}" /></a>

                        </p:column> 
                    </p:dataTable> 
                    </h:form>
                    <h:form>
                        <p:dataTable var="message" value="#{messageMeManagerBean.messages}" paginator="true" rows="5"> 
                        <f:facet name="header">  
                            Inbox <a href="messageMe.xhtml">(View All)</a>
                        </f:facet>

                        <p:column>  
                            <a href="messageMe.xhtml"><h:outputText value="#{message.sender}: #{message.title}" /></a>

                        </p:column> 
                    </p:dataTable> 
                    </h:form>
                </f:view>
            </p:panel>
        <h:form>
            <p:commandButton value ="Generate PDF" actionListener="#{controller.exportMyEmployeesToPDFBySQLConn(request, response)}"/>
        </h:form>
    </ui:define>
    <ui:define name="left-content">
        
        Welcome <h:outputText value="#{controller.employee.userName}" />.<br/><br/>
        
    </ui:define>    
</ui:composition>
    